//
//  CNNoDataView.m
//  CsdnPlus
//
//  Created by 孟瑞瑞 on 2018/6/1.
//  Copyright © 2018年 CSDN. All rights reserved.
//

#import "CNNoDataView.h"
#import <CNBaseTool/CNCategoryHeader.h>

@interface CNNoDataView ()

@end

@implementation CNNoDataView

+ (instancetype)diyEmptyView{
    
    if ([CNThemesManager isNight])
    {
        return [CNNoDataView emptyViewWithImageStr:@"noData_b"
                                          titleStr:@""
                                         detailStr:@"在这个星球找不到你需要的信息！"];
    }
    else
    {
        return [CNNoDataView emptyViewWithImageStr:@"noData_w"
                                          titleStr:@""
                                         detailStr:@"在这个星球找不到你需要的信息！"];
    }
    
}

+ (instancetype)diyEmptyActionViewWithTarget:(id)target action:(SEL)action{
    
    if ([CNThemesManager isNight])
    {
        return [CNNoDataView emptyActionViewWithImageStr:@"noNetwork_b"
                                                titleStr:@"无网络连接或服务器错误"
                                               detailStr:@""
                                             btnTitleStr:@"重新加载"
                                                  target:target
                                                  action:action];
    }
    else
    {
        return [CNNoDataView emptyActionViewWithImageStr:@"noNetwork_w"
                                                titleStr:@"无网络连接或服务器错误"
                                               detailStr:@""
                                             btnTitleStr:@"重新加载"
                                                  target:target
                                                  action:action];
    }
    
}
+ (instancetype)diyGroupView{
    if ([CNThemesManager isNight])
    {
        return [CNNoDataView emptyViewWithImageStr:@""
                                          titleStr:@"发布大本营动态"
                                         detailStr:@"成员的动态都会显示在这里"];
    }
    else
    {
        return [CNNoDataView emptyViewWithImageStr:@""
                                          titleStr:@"发布大本营动态"
                                         detailStr:@"成员的动态都会显示在这里"];
    }
}

- (void)prepare{
    [super prepare];
    
    self.autoShowEmptyView = NO;
    
    self.titleLabTextColor = readAndTimeTextColor; 
    self.titleLabFont = [UIFont systemFontOfSize:15];
    
    self.detailLabTextColor = readAndTimeTextColor;;
    self.detailLabFont = [UIFont systemFontOfSize:13];
    
    self.actionBtnTitleColor = slideBarTextColor;
    
    self.actionBtnBackGroundColor = naviBGNightColor;
}

@end
